import request from '@/utils/request'
import { downloadAction } from '@/api/requestEvents'

//获得项目计划任务书分页
export function planTaskPage(params: any) {
  return request({
    url: '/project/plan-task/page',
    method: 'get',
    params,
  })
}

//获得项目计划任务书详情
export function planTaskGet(params: any) {
  return request({
    url: '/project/plan-task/get',
    method: 'get',
    params,
  })
}

//创建项目计划任务书
export function planTaskCreate(data: any) {
  return request({
    url: '/project/plan-task/create',
    method: 'post',
    data,
  })
}

//更新项目计划任务书
export function planTaskUpdate(data: any) {
  return request({
    url: '/project/plan-task/update',
    method: 'put',
    data,
  })
}

//导出项目计划任务书 Excel
export function planTaskExport(params: any) {
  downloadAction(
    '/project/plan-task/export-excel',
    'get',
    params,
    '项目计划任务书列表.xls'
  )
}
